package com.qd.system.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 用户行程历史记录
 *
 * @author sjk
 */
@Getter
@Setter
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@TableName("panda_user_stroke_history")
public class UserStrokeHistory extends Model<UserStrokeHistory> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "sid", type = IdType.ASSIGN_ID)
    private String sid;
    /**
     * 用户昵称
     */
    @TableField("nick_name")
    private String nickName;
    /**
     * 行程开始时间
     */
    @TableField("start_time")
    private LocalDateTime startTime;
    /**
     * 预约时间
     */
    @TableField("appointment_time")
    private LocalDateTime appointmentTime;
    /**
     * 入场时间
     */
    @TableField("into_time")
    private LocalDateTime intoTime;
    /**
     * 出场时间
     */
    @TableField("out_time")
    private LocalDateTime outTime;
    /**
     * 计费开始时间
     */
    @TableField("bill_start_time")
    private LocalDateTime billStartTime;
    /**
     * 计费结束时间
     */
    @TableField("bill_end_time")
    private LocalDateTime billEndTime;
    /**
     * 停车时长:单位是秒
     */
    @TableField("park_time")
    private Long parkTime;
    /**
     * 停车费总额
     */
    @TableField("amount")
    private BigDecimal amount;
    /**
     * 实际支付总额
     */
    @TableField("pay_amount")
    private BigDecimal payAmount;
    /**
     * 线上支付总额
     */
    @TableField("on_line_pay_amount")
    private BigDecimal onLinePayAmount;
    /**
     * 过程状态:0生成订单未入场1预约主动取消2预约超时取消3已入场4已缴费未出场5已出场
     */
    @TableField("process_status")
    private Integer processStatus;
    /**
     * 停车场
     */
    @TableField("park_id")
    private String parkId;
    /**
     * 车牌
     */
    @TableField("plate_number")
    private String plateNumber;
    /**
     * 用户ID
     */
    @TableField("user_id")
    private String userId;
    /**
     * 备注
     */
    @TableField("note")
    private String note;
    /**
     * 行程类型:0停车1充电
     */
    @TableField("trip_type")
    private Integer tripType;
    /**
     * 预约类型:1强预约2普通预约
     */
    @TableField("strong_reservation")
    private Integer strongReservation;

    public void freeData() {
        this.sid = null;
        this.nickName = null;
        this.startTime = null;
        this.appointmentTime = null;
        this.intoTime = null;
        this.outTime = null;
        this.billStartTime = null;
        this.billEndTime = null;
        this.parkTime = null;
        this.amount = null;
        this.payAmount = null;
        this.onLinePayAmount = null;
        this.processStatus = null;
        this.parkId = null;
        this.plateNumber = null;
        this.userId = null;
        this.note = null;
        this.tripType = null;
        this.strongReservation = null;
    }

}
